home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / Anwender / Office / STFax / Install < prev    next >
Text File  |  1999-01-14  |  9KB  |  289 lines

  1. ; $VER: STFaxLite-AR-Install 1.0 (10.1.98)
  2. ;
  3. ; Installer script by Simone Tellini <wiz@pragmanet.it>
  4. ; with the help of Ben Preece <beej@bigfoot.com>
  5. ;
  6.  
  7. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8. ;  set initial variables
  9. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  10.  
  11. (set @app-name "STFax Lite")
  12. (set AppDir "STFax")
  13. (set @error-msg "An unexpected error has occured. Installation aborted.")
  14.  
  15. (if (<= (/ (getversion) 65536) 38)
  16.    (set Kick2 1)
  17.    (set Kick2 0)
  18. )
  19.  
  20. (if (exists "STFax:" (noreq))
  21.    (set @default-dest (pathonly (expandpath "STFax:")))
  22. )
  23.  
  24. (complete 0)
  25.  
  26. (welcome)
  27.  
  28. (set InstallDir
  29.    (askdir
  30.       (prompt "Please select where you would like " @app-name " installed.\n"
  31.               "A drawer called '" AppDir "' will be created there.")
  32.       (help "Select where you would like " @app-name " installed. "
  33.             "The installer will then create a drawer called '" AppDir "', "
  34.             "and copy the program and necessary files into it.\n")
  35.       (default @default-dest)
  36.    )
  37. )
  38.  
  39. (Set DestDir        (tackon InstallDir AppDir))
  40. (Set FaxInDir       (tackon DestDir "Fax_In"))
  41. (Set FaxOutDir      (tackon DestDir "Fax_Out"))
  42. (Set ConfigDir      (tackon DestDir "Config"))
  43. (Set LocaleDir      (tackon DestDir "Catalogs"))
  44. (Set ContribDir     (tackon DestDir "Contributions"))
  45. (Set DataDir        (tackon DestDir "Data"))
  46. (Set PicsDir        (tackon DestDir "Pics"))
  47. (Set RexxDir        (tackon DestDir "Rexx"))
  48. (Set ScriptDir      (tackon DestDir "Scripts"))
  49. (Set DocsDir        (tackon DestDir "Docs"))
  50. (Set MessagesDir    (tackon DestDir "Messages"))
  51.  
  52. (set @default-dest  DestDir)
  53.  
  54. (set MainExe "STFax")
  55.  
  56. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  57. ;  Unpack archive
  58. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  59.  
  60. (makeassign "STFaxInstall" "" (safe))
  61.  
  62.  
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64. ;  Create directories
  65. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  66.  
  67. (makedir DestDir)
  68. (makedir LocaleDir  (infos))
  69. (makedir FaxInDir   (infos))
  70. (makedir FaxOutDir  (infos))
  71. (makedir DataDir)
  72. (makedir ConfigDir)
  73. (makedir MessagesDir)
  74. (makedir (tackon MessagesDir "0000"))
  75.  
  76. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  77. ;  Copy files
  78. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  79.  
  80. (if (exists ("STFaxInstall:/STFax.info"))
  81.     (copyfiles
  82.         (source "STFaxInstall:/STFax.info")
  83.         (dest InstallDir)
  84.         (infos)
  85.         (noposition)
  86.     )
  87. )
  88.  
  89. (complete 10)
  90.  
  91. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  92. ;  Copy main file
  93. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  94.  
  95. (copyfiles
  96.    (source (tackon "STFaxInstall:" MainExe))
  97.    (dest DestDir)
  98.    (newname "STFax")
  99. )
  100.  
  101. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  102. ;  copy icons files, if needed
  103. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  104.  
  105.  
  106. (if (= (exists (tackon DestDir "STFax.info")) 0)
  107.     (copyfiles (source "STFaxInstall:STFax.info")       (dest DestDir)   (noposition))
  108. )
  109.  
  110. (if (= (exists (tackon DestDir "STFax.guide.info")) 0)
  111.     (copyfiles (source "STFaxInstall:STFax.guide.info") (dest DestDir)   (noposition))
  112. )
  113.  
  114. (copyfiles (source "STFaxInstall:Catalogs.info")    (dest DestDir)   (noposition))
  115. (copyfiles (source "STFaxInstall:Rexx.info")        (dest DestDir)   (noposition))
  116.  
  117. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  118. ;  copy sub directories
  119. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  120.  
  121. (copyfiles (source "STFaxInstall:Rexx")             (dest RexxDir)   (noposition) (infos) (all))
  122. (copyfiles (source "STFaxInstall:Scripts")          (dest ScriptDir) (noposition) (infos) (all))
  123. (copyfiles (source "STFaxInstall:Pics")             (dest PicsDir)   (all))
  124. (complete 20)
  125. (copyfiles (source "STFaxInstall:Data")             (dest DataDir)   (all))
  126. (copyfiles (source "STFaxInstall:Docs")             (dest DocsDir)   (noposition) (infos) (all))
  127. (complete 40)
  128.  
  129. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  130. ;  move old files in the right position
  131. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  132.  
  133. (if (= (exists (tackon DestDir "NoData.txt")) 1)
  134.     (
  135.         (copyfiles (source (tackon DestDir "NoData.txt")) (dest DataDir))
  136.         (delete (tackon DestDir "NoData.txt"))
  137.     )
  138. )
  139.  
  140. (copyfiles (source "STFaxInstall:STFax.guide")   (dest DestDir))
  141.  
  142. (if Kick2
  143.    (tooltype
  144.       (dest (tackon DestDir "STFax.guide"))
  145.       (setdefaulttool "AmigaGuide")
  146.    )
  147. )
  148.  
  149. (complete 50)
  150.  
  151. (copyfiles
  152.   (source "STFaxInstall:Catalogs")
  153.   (dest LocaleDir)
  154.   (pattern "#?.c?")
  155. )
  156.  
  157. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  158. ;  Install MUI classes
  159. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  160.  
  161. (copylib
  162.        (prompt "Installing some MUI classes... (NFloattext.mcc)")
  163.        (help   "This will install some MUI classes needed by STFax")
  164.        (source "STFaxInstall:MUI/NFloattext.mcc")
  165.        (dest   "MUI:Libs/MUI")
  166.        (confirm)
  167. )
  168.  
  169. (copylib
  170.        (prompt "Installing some MUI classes... (NList.mcc)")
  171.        (help   "This will install some MUI classes needed by STFax")
  172.        (source "STFaxInstall:MUI/NList.mcc")
  173.        (dest   "MUI:Libs/MUI")
  174.        (confirm)
  175. )
  176.  
  177. (copylib
  178.        (prompt "Installing some MUI classes... (NListview.mcc)")
  179.        (help   "This will install some MUI classes needed by STFax")
  180.        (source "STFaxInstall:MUI/NListview.mcc")
  181.        (dest   "MUI:Libs/MUI")
  182.        (confirm)
  183. )
  184.  
  185. (copylib
  186.        (prompt "Installing some MUI classes... (NListviews.mcp)")
  187.        (help   "This will install some MUI classes needed by STFax")
  188.        (source "STFaxInstall:MUI/NListviews.mcp")
  189.        (dest   "MUI:Libs/MUI")
  190.        (confirm)
  191. )
  192.  
  193. (copylib
  194.        (prompt "Installing some MUI classes... (Textinput.mcc)")
  195.        (help   "This will install some MUI classes needed by STFax")
  196.        (source "STFaxInstall:MUI/Textinput.mcc")
  197.        (dest   "MUI:Libs/MUI")
  198.        (confirm)
  199. )
  200.  
  201. (copylib
  202.        (prompt "Installing some MUI classes... (Textinput.mcp)")
  203.        (help   "This will install some MUI classes needed by STFax")
  204.        (source "STFaxInstall:MUI/Textinput.mcp")
  205.        (dest   "MUI:Libs/MUI")
  206.        (confirm)
  207. )
  208.  
  209. (copylib
  210.        (prompt "Installing some MUI classes... (Textinputscroll.mcc)")
  211.        (help   "This will install some MUI classes needed by STFax")
  212.        (source "STFaxInstall:MUI/Textinputscroll.mcc")
  213.        (dest   "MUI:Libs/MUI")
  214.        (confirm)
  215. )
  216.  
  217. (complete 60)
  218.  
  219. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  220. ;  Install stuff on SYS:
  221. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  222.  
  223. (copyfiles
  224.     (source "STFaxInstall:Devs/Printers/STFaxPrt")
  225.     (dest "DEVS:Printers")
  226. )
  227.  
  228. (copyfiles
  229.   (source "STFaxInstall:Devs/Datatypes")
  230.   (dest "DEVS:Datatypes")
  231.   (pattern "#?")
  232.   (infos)
  233.   (noposition)
  234. )
  235.  
  236. (copylib
  237.        (prompt "Installing STFax.datatype...")
  238.        (help   "This will install the STFax.datatype: it will let "
  239.                "you import STFax faxes into any program that supports "
  240.                "datatypes.")
  241.        (source "STFaxInstall:Classes/Datatypes/STFax.datatype")
  242.        (dest   "SYS:Classes/Datatypes")
  243.        (confirm)
  244. )
  245.  
  246. (complete 70)
  247.  
  248. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  249. ;  Update the user-startup
  250. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  251.  
  252. (startup "STFax"
  253.         (prompt "Editing your S:User-Startup")
  254.         (help   "The Installer will add one assign needed by STFax")
  255.         (command (cat "Assign STFax: \"" DestDir "\" >NIL:"))
  256. )
  257.  
  258. (makeassign "STFax" DestDir)
  259.  
  260. (complete 80)
  261.  
  262. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  263. ;  install catalogs
  264. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  265.  
  266. (copyfiles
  267.         (prompt "Copying catalog files")
  268.         (help @copyfiles-help)
  269.         (source "STFaxInstall:Catalogs")
  270.         (dest LocaleDir)
  271.         (choices "deutsch" "français" "italiano")
  272.         (confirm)
  273. )
  274.  
  275. (complete 90)
  276.  
  277. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  278. ;  Delete temp files
  279. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  280.  
  281. (run "Assign STFaxInstall: REMOVE" (safe))
  282.  
  283. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  284. ;  All done.
  285. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  286.  
  287. (complete 100)
  288.  
  289.